package com.luoyuanxiangvip.common.utils;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * <p>
 * 分页工具
 * </p>
 *
 * @author luoyuanxiang <p>luoyuanxiangvip.com</p>
 * @since 2019/5/26 18:42
 */
@Getter
@Setter
public class PageUtil<T> {

    private List<T> list;

    private Long total;

    public PageUtil(IPage<T> page) {
        this.list = page.getRecords();
        this.total = page.getTotal();
    }
}
